<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="RolEditDlg" widgetVar="RolEditDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.EditRolTitle}">

            <h:form id="RolEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{rolController.selected != null}">

                        <h:outputLabel value="#{bundle.EditRolLabel_id}" for="id" />
                        <h:outputText id="id" value="#{rolController.selected.id}" />

                        <p:outputLabel value="#{bundle.EditRolLabel_nombreRol}" for="nombreRol" />
                        <p:inputText id="nombreRol" value="#{rolController.selected.nombreRol}" title="#{bundle.EditRolTitle_nombreRol}" required="true" requiredMessage="#{bundle.EditRolRequiredMessage_nombreRol}"/>

                        <p:outputLabel value="#{bundle.EditRolLabel_lastUpdateBy}" for="lastUpdateBy" />
                        <p:inputText id="lastUpdateBy" value="#{rolController.selected.lastUpdateBy}" title="#{bundle.EditRolTitle_lastUpdateBy}" />

                        <p:outputLabel value="#{bundle.EditRolLabel_descripcion}" for="descripcion" />
                        <p:inputText id="descripcion" value="#{rolController.selected.descripcion}" title="#{bundle.EditRolTitle_descripcion}" required="true" requiredMessage="#{bundle.EditRolRequiredMessage_descripcion}"/>

                        <p:outputLabel value="#{bundle.EditRolLabel_creationDate}" for="creationDate" />
                        <p:calendar id="creationDate" pattern="dd/MM/yyyy HH:mm:ss" value="#{rolController.selected.creationDate}" title="#{bundle.EditRolTitle_creationDate}" required="true" requiredMessage="#{bundle.EditRolRequiredMessage_creationDate}" showOn="button"/>

                        <p:outputLabel value="#{bundle.EditRolLabel_createdBy}" for="createdBy" />
                        <p:inputText id="createdBy" value="#{rolController.selected.createdBy}" title="#{bundle.EditRolTitle_createdBy}" required="true" requiredMessage="#{bundle.EditRolRequiredMessage_createdBy}"/>

                        <p:outputLabel value="#{bundle.EditRolLabel_lastUpdateDate}" for="lastUpdateDate" />
                        <p:calendar id="lastUpdateDate" pattern="dd/MM/yyyy HH:mm:ss" value="#{rolController.selected.lastUpdateDate}" title="#{bundle.EditRolTitle_lastUpdateDate}"  showOn="button"/>

                        
                    </p:panelGrid>
                    <p:commandButton actionListener="#{rolController.save}" value="#{bundle.Save}" update="display,:RolListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,RolEditDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="RolEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
